package com.springboot.test.config;

import com.springboot.test.bean.Cat;
import com.springboot.test.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @author likai
 * @date 2021/10/8 3:31 PM
 * @email likai9376@163.com
 * @desc
 */
@Import({Person.class,Cat.class})
@Configuration
public class MyConfig {


    @Bean
    public Person person01(){
        Person person = new Person();
        person.setId(1);
        person.setName("hello");
        return person;
    }


    @Bean
    public Cat tom01(){
        Cat cat = new Cat();
        cat.setName("01");
        cat.setAge(1);
        return cat;
    }
}
